Release 10.1A: OpenEdge Development:
ADM Reference


highlightWidget

Sets the background and foreground colors (FGCOLOR and BGCOLOR widget attributes) of the named object or objects to a standard highlight color, depending on the value of the highlightType argument. For example, you may want to change the background color of a field with an invalid value to red.

Location: visual.p

Parameters:

INPUT namelist AS CHARACTER

The name of one or more objects, separated by commas.

INPUT highlightType AS CHARACTER

Determines the color values applied to the FGCOLOR and BGCOLOR widget attributes. Table 3–1 shows the valid values of this parameter map to certain attributes of the visual class.

Table 3–1: Color values for foreground and background widget attributes
Valid value
Foreground color
Background color
info or information
colorInfoFG attribute
colorInfoBG attribute
warn or warning
colorWarnFG attribute
colorWarnBG attribute
err or error
colorErrorFG attribute
colorErrorBG attribute
def or default
Windows default
Windows default

The default setting uses the default Windows color values for foreground and background. The visual class attributes use values mapped to the application’s color table. Table 3–2 shows the default values for the visual class attributes.

Table 3–2: Default color values for visual class attributes
Attribute
Default color value
colorInfoFG
? (unknown value)
colorInfoBG
10 (green)
colorWarnFG
? (unknown value)
colorWarnBG
14 (yellow)
colorErrorFG
? (unknown value)
colorErrorBG
12 (red)

Returns: LOGICAL

Notes:

The following illustrates the use of this method in 4GL code for use with a graphical user interface:

IF widgetIsBlank("phone":U) THEN highlightWidget("phone":U, "warn":U). 

The following illustrates the use of this method in DHTML code for use with a Web browser:

logic.highlightWidget(‘customerviewv.phone,customerviewv.fax’,’warn’); 


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095